package zkl.test;


import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import com.zkl.util.UuidUtil;
import com.zkl.web.base.entity.User;
import com.zkl.web.base.model.UserMapper;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations="classpath:config/spring-mybatis.xml")
public class mybatis {
		@Autowired
	   public UserMapper userMapper;
	    @Test
	    public void testHello(){
	    	User user = new User();
	    	user.setUserId(UuidUtil.uuid32());
	    	user.setAccount("A1604042");
	    	user.setEmail("314778147@qq.com");
	    	user.setPhone("13912730490");
	    	user.setPasswd("123456");
	    	user.setVersion(0L);
	    	userMapper.insert(user);
	    	System.out.println();
	    }
	    
	    @Test  
	    public void test(){  
/*	        PageHelper.startPage(1, 20); // 核心分页代码  
	        List<User> cls =  userMapper.;
	        for (User column : cls) {  
	            System.out.println(column.getAccount());  
	        } */ 
	    }  
}
